require(dplyr)
require(tidyr)
require(countrycode)
require(stringr)
source("functions.R")

# GTI
dat <- readRDS("class.RDS")
dat <- dat[dat$country.class != "us",]
dat$country.class[dat$country.class %in% c("cn", "tw", "mo")] <- "cn"
dat_gti <- get_gti(dat)
saveRDS(dat_gti, "data_index_global.RDS")
